how to take the second derivative using implicit